<template>
    <div class="announceDetail">
        <assets-head :title="$t('公告详情')" />
        <div class="content">
            <div class="font-52 font-700 textColor">{{ title }}</div>
            <p class="mt-20 text-grey font-24" v-show="startTimeStr!==null || startTimeStr!== ''">{{ startTimeStr }}</p>
            <div class="flex justify-center mt-30" v-if="imgUrl">
              <img :src="`${BASE_URL}/public/showimg!showImg.action?imagePath=${imgUrl}`" class="w-full" alt="" />
            </div>
            <div class="mt-32 text-cont textColor" v-html="content"></div>
        </div>
    </div>
</template>

<script>
import assetsHead from "@/components/assets-head";
import Axios from '@/API/userCenter'
import { dataTimeEx } from '@/utils/utis'
import {BASE_URL} from "@/config";

export default {
    props: {

    },
    components: {
        assetsHead
    },
    data() {
        return {
            title:'',
            startTimeStr:'',
            content:'',
            BASE_URL,
            imgUrl:'',
        }
    },
    mounted() {
        this.getNews();
    },
    methods: {
        getNews() {
            Axios._getNews({
                id:this.$route.query.id,
                language: this.$i18n.locale,
            }).then(res => {
                this.title= res.data.title;
                this.startTimeStr = res.data.startTimeStr
                this.content = res.data.content
                this.imgUrl = res.data.imgUrl
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.announceDetail{
    width: 100%;
    box-sizing: border-box;
}
.content {
    padding: 40px 32px;
}

.title {
    text-decoration: underline;
}
.text-cont{
    word-wrap:break-word;
}
</style>